/**
 *
 * @ProjectName:    main_page
 * @ClassName:      splash_page
 * @Description:    dart类作用描述
 * @Author:         孙浩
 * @QQ:             243280864
 * @CreateDate:     2020/11/23 12:10 AM
 */
import 'package:app_base_page/app_base_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:main_page/home_page.dart';
import 'package:main_page/res.dart';

class SplashPage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _SplashSate();
}

class _SplashSate extends BasePage<SplashPage> {
  @override
  bool pageV() => false;

  @override
  Widget initPageBody(BuildContext c) => Center(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Row(
              mainAxisSize: MainAxisSize.min,
              children: [
                Hero(
                    tag: "pageLogo",
                    child: Image.asset(
                      Res.logo,
                      height: 40,
                      width: 40,
                    )),
                SizedBox(width: 20,),
                Text(
                  "云袭商学院",
                  style: TextStyle(
                      color: Colors.black,
                      fontWeight: FontWeight.bold,
                      fontSize: 24),
                )
              ],
            ),
            MaterialButton(
              onPressed: () {
                Navigator.pushAndRemoveUntil(
                    context,
                    MaterialPageRoute(builder: (ctx) => HomePage()),
                    (route) => false);
              },
              child: Text("点击进入"),
              shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(100)),
            )
          ],
        ),
      );
}
